package ar.uba.fi.tonyvaliente.signature.query;

import java.util.List;

import ar.uba.fi.tonyvaliente.documents.Query;
import ar.uba.fi.tonyvaliente.documents.QueryFactory;
import ar.uba.fi.tonyvaliente.documents.exception.QueryException;
import ar.uba.fi.tonyvaliente.signature.HashFunction;
import ar.uba.fi.tonyvaliente.signature.files.SignatureIndex;

/**
 * QueryFactory vinculada al indice de signature files 
 * @author dmorello
 */
public class SignatureQueryFactory extends QueryFactory {
	
	protected SignatureIndex signatureIndex;
	protected List<HashFunction> hashFunctions;
	protected int hashLength;
	
	public SignatureQueryFactory(SignatureIndex index, 
			List<HashFunction> hashFunctions, int hashLength) {
		super(index);
		this.signatureIndex = index;
		this.hashFunctions = hashFunctions;
		this.hashLength = hashLength;
	}

	@Override
	public Query createBooleanQuery(String strQuery) throws QueryException {
		return SignatureQuery.newInstance(strQuery, this);
	}
}